/*
 * $Id: LogonOnlySweepTask.java,v 1.5 2009/05/06 21:10:50 navdeep_mahajan Exp $
 * 
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.processor.dispatcher.tasks;

import com.ge.healthcare.autosc.common.ASCLogger;
import com.ge.healthcare.autosc.common.database.pojo.ActTask;

/**
 * @author 212042764
 * 
 */
public class LogonOnlySweepTask extends IPSweepTask {

	/**
	 * Executes logon only task
	 * @see com.ge.healthcare.autosc.processor.dispatcher.tasks.IPSweepTask#executeTask(com.ge.healthcare.autosc.common.database.pojo.ActTask)
	 */
	public void executeTask(ActTask task) {
		String methodName = "executeTask";
		boolean success = false;
		ASCLogger.debug(this.getClass(), methodName,
				"Starting LogonOnlySweepTask for task:" + task);
		this.task = task;
		try{
			this.init();
			try {
				this.makeConnection();
				this.performLogin();
				success = true;
			} finally {
				this.ftpLogout();
				this.addChronology(success);
			}
		}finally{
			this.endLogProcessing(success);
		}
		ASCLogger.debug(this.getClass(), methodName,
				"Finished LogonOnlySweepTask for task:" + task);
	}

}
